package Accessors;

import java.util.Date;

import Callbacks.AbstractCallback;
import Models.BFReport;
import Presenter.BFReportPresenter;
import android.app.ProgressDialog;
import android.content.Context;

@SuppressWarnings("rawtypes")
public class BFReportAccessor extends AbstractAccessor<BFReport,BFReportPresenter,AbstractCallback> {
	private final String NAME = "brewforecastreport";
	private final String DIALOG = "Brew Forecast Report";
	
	private final static BFReportPresenter presenter = new BFReportPresenter();
	
	//Modal dialog variable.
	ProgressDialog modalDialog = null;
	
	public BFReportAccessor(AbstractCallback callback){
		super(presenter, callback);
	}
	
	//Public access functions.
	public void runReport(final Date date, final int days, final Context context){
		String dialog = "Loading " + DIALOG + " List...";
		String rfString = NAME + "/" + date.toString() + "/" + Integer.toString(days);
		rfString = rfString.replaceAll(" ", "%20");
		super.getAllItems(context, dialog, rfString);
	}
}
